<html>
	<head>
		<script type="text/javascript">
<?php if (isset($json)): ?>
		var newStructure = false;
		var structure = <?php echo $json ?>;
		structure.id =  <?php echo $id ?>;
<?php else: ?>
		var newStructure = true;
		var structure = {
			id: null,
			name: null,
			num_dimension: null,
			dimensions: [],
			numCols: null,
			tables: []
		}
<?php endif; ?>
			
	var desigNames = ["<?php echo implode('","', $desigNames); ?>"];
	var desigIds = [<?php echo implode(',', $desigIds); ?>];
		
		</script>

		<meta charset="utf-8">
		<title>Overriding</title>
	</head>
	<body>

		<div id="step1" class="grid_16 step">
			<h3>Step1</h3>
			Enter name for new structure: <br/>
			<input type="text" id="structureName"><br/>
			Choose No. of Dimensions: 
			<select id="NumDimension">
				<option selected></option>
				<option>0</option>
				<option>1</option>
				<option>2</option>
			</select>

			<div id="dimension1" class="dimension" style="display: none;">
				Dimension 1:
				<select id="NumDimension1">
					<option selected></option>
					<option value="my_rank">My Designation</option>
					<option value="your_rank">Your Designation</option>
					<!--					<option value="my_comm_range">My Commission Range</option>
										<option value="your_comm_range">Your Commission Range</option>-->
				</select>
			</div>
			<div id="dimension2" class="dimension" style="display: none;">
				Dimension 2:
				<select id="NumDimension2">
					<option selected></option>
					<option value="my_rank">My Designation</option>
					<option value="your_rank">Your Designation</option>
					<!--					<option value="my_comm_range">My Commission Range</option>
										<option value="your_comm_range">Your Commission Range</option>-->
				</select>
			</div>
			<div id="tiers" class="dimension" style="display: none;">
				Choose No. of Tiers
				<select id="NumTiers">
					<option selected></option>
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
				</select>
			</div>
		</div>
		<div id="step2" class="step grid_16" style="display:none;">
			<h3>Step2</h3>
			<div id="tables">
			</div>
			<button id="btnSave">Save</button>
		</div>
		<div class="grid_16">
			<button id="btnBack">Back to Transaction Data</button>
			<button id="btnNext">Next</button>
		</div>

		<div id="dlg_TierConfig">
			<form id="dlg_TierConfigForm">
				<table>
					<tr>
						<td>
							<label>No. of Tiers</label>
						</td>
						<td>
							<input name="numTiers" type="text"> </input>
						</td>
					</tr>
					<tr>
						<td>
							<label>Eligiblity Criteria</label>
						</td>
						<td>
							<input name="eligibility" type="text"> </input>
						</td>
					</tr>
					<tr>
						<td>
							<label>Team Override</label>
						</td>
						<td>
							<input name="teamOverride" type="checkbox" value="0"> </input>
						</td>
					</tr>

					<tr>
						<td>
							<label>Compression when ineligible</label>
						</td>
						<td>
							<input name="compressionIfIneligible" type="checkbox" value="0"/>
						</td>
					</tr>
					<tr>
						<td>
							<label>Compression when quitting</label>
						</td>
						<td>
							<input name="compressionIfQuitting" type="checkbox"  value="0"/>
						</td>
					</tr>
					<tr>
						<td>
							<label>Compression when tier is nil</label>
						</td>
						<td>
							<input name="compressionIfTierIsNil" type="checkbox"  value="0"/>
						</td>
					</tr>
					<tr>
						<td>
							<label>Overriding strategy</label>
						</td>
						<td>
						</td>
					</tr>
				</table>
			</form>
		</div>
	</body>
</html>